<?php 
use Wdl\helper\webHelper;
?>
<style>
    .blocknum{
        text-align: center;
    }
</style>
<div class="panel panel-default">
    <ul class="nav nav-tabs" style="margin-top: 5px; padding-left: 10px;">
     
        <li class="{if (empty($rd) || $rd=='index')}active{/if}">
        <a href="{php echo $this->createWebUrl('slogs', array('op' => $operation))}"> 
			用户数据 </a></li>
       
    </ul>

  
    <div class="panel-body table-responsive">
       	 
        <div class="row">
            <div class="col-sm-2 blocknum">
                <p> {$stat['total']}人</p>
                <p><b>总注册</b></p>
            </div>
            <div class="col-sm-2 blocknum">
                <p> {$stat['total_today']} 人</p>
                <p><b>今日注册</b></p>
            </div>
            <div class="col-sm-2 blocknum">
                <p> {$stat['total_today_visit']}次</p>
                <p><b>今日访问</b></p>
            </div>
            <div class="col-sm-2 blocknum">
                <p> {$stat['total_visit']}次</p>
                <p><b>总访问</b></p>
            </div>
            <div class="col-sm-2 blocknum">
                <p> {$stat['total_borker']}人</p>
                <p><b>经纪人</b></p>
            </div>
        </div>
        
    </div>
</div>

<div class="panel panel-default">
    <ul class="nav nav-tabs" style="margin-top: 5px; padding-left: 10px;">
        <?php 
        $types = webHelper::zhutypeLabel();
        ?>
        {loop $types $key $item}
        <li class="{if $key==0}active{/if}">
        <a href="#" onclick="house(this)" data-type="{$key}"> 
			{$item} </a></li>
       {/loop}
    </ul>
    <script>
        function house(elm){
            $(elm).parents("ul").find("li").removeClass('active');
            $(elm).parent().addClass("active")
            $.get("{php echo $this->createWebUrl('stdata', array( 'op' => 'house'))}&zhutype="+$(elm).data('type'), 
                function(ret){
                    $("#HOUSEDATA").html(ret);
                })
        }
        $.get("{php echo $this->createWebUrl('stdata', array( 'op' => 'house'))}&zhutype=0" , 
                function(ret){
                    $("#HOUSEDATA").html(ret);
                })
    </script>
  
    <div class="panel-body table-responsive">
       	 
        <div class="row" id="HOUSEDATA">
           <!-- 这里ajax插入数据 -->
        </div>
        
    </div>
</div>